﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ManageTemplate.aspx.cs"
    Inherits="KOP.Services.ManageTemplate" Debug="true" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Template Manager</title>
    <style type="text/css">
        .leftcolumn
        {
            vertical-align: middle;
            text-align: right;
            width: 100px;
            font-family: Tahoma;
            font-size: 8pt;
            font-weight: normal;
        }
        .rightcolumn
        {
            vertical-align: middle;
            width: 250px;
            text-align: left;
        }
        .control
        {
            font-size: 8pt;
            font-family: Tahoma;
            text-indent: 2px;
            vertical-align:middle;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="ctlUpdatePanel" runat="server">
            <ContentTemplate>
                <table>
                    <tr>
                        <td style="width: 400px">
                            <span  class="control">Dosya Yolu :</span>
                            <asp:TextBox ID="ctlQueryFilePath" runat="server" Width="250px" CssClass="control"></asp:TextBox>&nbsp;
                            <asp:Button ID="ctlSearch" runat="server" Text="Ara" Width="50px" 
                                CssClass="control" onclick="ctlSearch_Click"/>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top" style="width: 400px">
                            <asp:GridView ID="ctlDataGrid" runat="server" AllowPaging="True" CaptionAlign="Top"
                                GridLines="None" HorizontalAlign="Left" AllowSorting="True" AutoGenerateColumns="False"
                                CellPadding="4" DataKeyNames="Id"  ForeColor="#333333"
                                OnSelectedIndexChanged="ctlDataGrid_SelectedIndexChanged" Width="400px" 
                                CssClass="control" PageSize="2">
                                <RowStyle BackColor="#EFF3FB" />
                                <Columns>
                                    <asp:CommandField ShowSelectButton="True" />
                                    <asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False" ReadOnly="True"
                                        SortExpression="Id" >
                                        <HeaderStyle HorizontalAlign="Left" />
                                        <ItemStyle HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Type" HeaderText="Type" SortExpression="Type" >
                                        <HeaderStyle HorizontalAlign="Left" />
                                        <ItemStyle HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="DateTime" HeaderText="DateTime" 
                                        SortExpression="DateTime" >
                                        <HeaderStyle HorizontalAlign="Left" />
                                        <ItemStyle HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="FilePath" HeaderText="FilePath" 
                                        SortExpression="FilePath" >
                                        <HeaderStyle HorizontalAlign="Left" />
                                        <ItemStyle HorizontalAlign="Left" />
                                    </asp:BoundField>
                                </Columns>
                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <EditRowStyle BackColor="#2461BF" />
                                <AlternatingRowStyle BackColor="White" />
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top" style="width: 400px">
                            <table cellpadding="1" cellspacing="1" width="400">
                                <tr>
                                    <td class="leftcolumn">
                                        <span>Şablon Tipi :</span>
                                    </td>
                                    <td class="rightcolumn">
                                        <asp:DropDownList ID="ctlTemplateType" runat="server" CssClass="control" Width="206px">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="leftcolumn">
                                        <span>Ekleme Tarihi :</span>
                                    </td>
                                    <td class="rightcolumn">
                                        <asp:TextBox ID="ctlAddDate" runat="server" CssClass="control" Width="200px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="leftcolumn">
                                        <span>Dosya Yolu :</span>
                                    </td>
                                    <td class="rightcolumn">
                                        <asp:TextBox ID="ctlFilePath" runat="server" CssClass="control" Width="200px"></asp:TextBox><asp:RequiredFieldValidator
                                            ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ControlToValidate="ctlFilePath"
                                            ValidationGroup="1"></asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="leftcolumn">
                                        <span>Dosya :</span>
                                    </td>
                                    <td class="rightcolumn">
                                        <asp:FileUpload ID="ctlFileUpload" runat="server" CssClass="control" Width="206px" /><asp:RequiredFieldValidator
                                            ID="RequiredFieldValidator2" runat="server" ErrorMessage="*" ControlToValidate="ctlFileUpload"
                                            ValidationGroup="1"></asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" style="text-align:center;">
                                        <asp:Button ID="ctlAdd" runat="server" Text="Ekle" OnClick="ctlAdd_Click" ValidationGroup="1" CssClass="control"/>
                                        &nbsp;
                                        <asp:Button ID="ctlUpdate" runat="server" Text="Düzelt" OnClick="ctlUpdate_Click" CssClass="control"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <asp:Label ID="ctlResultLabel" runat="server" ForeColor="Red" CssClass="control"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger ControlID="ctlAdd" />
                <asp:PostBackTrigger ControlID="ctlUpdate" />
            </Triggers>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
